package com.ontheroad.mysql.topic.service;

import cn.modoumama.service.base.impl.BaseServiceImpl;
import com.ontheroad.mysql.topic.mapper.TopicUserMapper;
import com.ontheroad.topic.model.TopicUserModel;
import com.ontheroad.topic.service.TopicUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by kedong on 2017/10/12 0012.
 */
@Service
@Transactional
public class TopicUserServiceImpl extends BaseServiceImpl<TopicUserModel, Integer> implements TopicUserService {

    private Logger log = LoggerFactory.getLogger(getClass());

    @Autowired
    private TopicUserMapper mapper;

    @Autowired
    public void setMapper(TopicUserMapper mapper) {
        setGenericMapper(mapper);
    }

    @Override
    public TopicUserModel save(TopicUserModel topicUserModel) {
        mapper.insertModel(topicUserModel);
        return topicUserModel;
    }
}
